package com.hbpu.encap.IO;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class Properties01 {
    public static void main(String[] args) throws IOException {
        String path = "D:\\HBPUcode\\demo\\demo01\\Chapter02\\src\\mysql.properties";
        Properties properties = new Properties();
        properties.load(new FileReader(path));
        properties.list(System.out);
        String user = properties.getProperty("user");
        System.out.println(user);
    }
}
